package fanalg;

/**
 * Class representing an input of an circuit
 * @author Tomasz Werszko
 *
 */
public class Input extends CircuitEntity {
	
	/**
	 * Constructor which assigns input and output
	 */
	public Input(String name){
		this.inputs = new String[1];
		this.inValues = new LogicSystem[1];
		this.inputs[0] = name;
		this.inValues[0] = LogicSystem.X;
		this.output = name;
		this.outValue = LogicSystem.X;
		
		//setting controllability
		CC0 = 1;
		CC1 = 1;
	}
	
	public String toString(){
		String string = "Input " + this.output;
		return string;
	}
	
	public LogicSystem evaluate(LogicSystem[] inputs){
		return inputs[0];
	}
}
